﻿@model IEnumerable<HawaiRestaurant.Models.DataContext.Customer>

@{
    ViewBag.Title = "ListCustomer";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.dataTables.js")" type="text/javascript"></script>
<h2>ListCustomer</h2>
@section MyOtherJavascript {
    <script type="text/javascript">
        $(document).ready(function() {
            $('#customer').dataTable();
        });
    </script>
}
<p>
    @Html.ActionLink("Create New", "CreateCustomer")
</p>

<table cellpadding="0" cellspacing="0" border="0" class="display" id="customer">
	<thead>
		 <tr>
        <th>
            Name
        </th>
        <th>
           Address
        </th>
        <th>
            Phone
        </th>
        <th>
           Fax
        </th>
        <th>
            Account
        </th>
        <th>
            Position
        </th>
        <th>
            Org
        </th>
       
        <th>
            UserName
        </th>
             <th></th>
             <th></th>
    </tr>
	</thead>
	<tbody>
		
		@foreach (var item in Model) {
   <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
       <td>
           @Html.DisplayFor(modelItem => item.CustomerAddress)
       </td>
        <td>
            @Html.DisplayFor(modelItem => item.CustomePhone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CustomerFax)
        </td>
       <td>
           @Html.DisplayFor(modelItem => item.CustomerAccount)
       </td>
       
       
        <td>
           @Html.DisplayFor(modelItem => item.Position.Name)
       </td>
        <td>
            @Html.DisplayFor(modelItem => item.OrganizationName)
        </td>
       
        <td>
            @Html.DisplayFor(modelItem => item.UserName)
        </td>
       <td>
           @Html.ActionLink("Edit", "EditCustomer", new { id=item.CustomerId },new { @class = "useredit"}) 
          
       </td>
       <td>
             @Html.ActionLink("Delete", "DeleteCustomer", new { id = item.CustomerId }, new { @class = "userdelete" })
       </td>
    </tr>
}

	</tbody>
	
</table>



